<!DOCTYPE html>
<html lang="zh-CN">
<head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0, user-scalable=no">
    <title>分类商品详情</title>
    <link rel="stylesheet" type="text/css" href="/shop/css/base.css"/>
    <link rel="stylesheet" type="text/css" href="/shop/css/cation.css"/>
    <link rel="stylesheet" type="text/css" href="/shop/css/mui.min.css"/>
    <link rel="stylesheet" type="text/css" href="/shop/css/loaders.min.css"/>
    <link rel="stylesheet" type="text/css" href="/shop/css/loading.css"/>
    <script src="/shop/js/rem.js"></script>
    <script src="/shop/js/jquery.min.js" type="text/javascript"></script>
    <script src="/js/common.js"></script>
    <script src="/js/plugins/jrender/jrender.js"></script>
    <script type="text/javascript">
        $(window).load(function () {
            $(".loading").addClass("loader-chanage")
            $(".loading").fadeOut(300);

            // 获取地址栏分类 id 数据
            var id = getParams().id;

            // 页面加载完毕发送请求获取所有积分商品分类
            $.get("/productCatalogs/" + id + "/products", function (data) {
                $("#catalogs").renderValues({list: data}, {
                    handler: function (ele, value) {
                        ele.href = "/mine/detail.html?id=" + value;
                    }
                });
            });
        });
    </script>
</head>
<!--loading页开始-->
<div class="loading">
    <div class="loader">
        <div class="loader-inner pacman">
            <div></div>
            <div></div>
            <div></div>
            <div></div>
            <div></div>
        </div>
    </div>
</div>
<!--loading页结束-->
<body>
<!--头部区域-->
<header class="mui-bar mui-bar-nav" id="header">
    <a class="btn" href="javascript:history.go(-1)">
        <i class="iconfont icon-fanhui"></i>
    </a>
    <h4>分类商品列表</h4>
    <a class="btn" href="#">
        <i class="iconfont icon-erweima"></i>
    </a>
</header>

<!--头部区域结束-->
<div class="warp clearfloat" id="catalogs">
    <div class="cations clearfloat" render-loop="list">
        <div class="list clearfloat fl">
            <a href="" render-key="list.id" render-fun="handler" >
                <p class="tit over box-s" render-html="list.productName"></p>
                <div class="tu">
                    <img src="" render-src="list.coverUrl"/>
                </div>
            </a>
        </div>
    </div>
</div>

<!--尾部区域-->
<footer class="page-footer fixed-footer" id="footer">
    <ul>
        <li>
            <a href="index.html">
                <i class="iconfont icon-shouye"></i>
                <p>首页</p>
            </a>
        </li>
        <li class="active">
            <a href="cation.html">
                <i class="iconfont icon-icon04"></i>
                <p>分类</p>
            </a>
        </li>
        <li>
            <a href="shopcar.html">
                <i class="iconfont icon-gouwuche"></i>
                <p>购物车</p>
            </a>
        </li>
        <li>
            <a href="center.html">
                <i class="iconfont icon-yonghuming"></i>
                <p>我的</p>
            </a>
        </li>
    </ul>
</footer>
</body>

</html>
